<?php
/**
 * Created by PhpStorm.
 * User: liuhong
 * Date: 2018/8/27
 * Time: 下午2:17
 */

namespace Common\Service;


use King\Model\goodsModel;
use Think\Exception;

class GoodsService extends BaseService
{
    public $goodsModel;
    public function __construct()
    {
        $this->goodsModel=new goodsModel();
    }

    /**
     * 查询出活动商品信息
     * @return bool|mixed
     */
    public function selectActiveGoodsInfo(){
        try{
           return $this->goodsModel->where(array('is_active'=>1))->select();
        }catch (Exception $ex){
            echo 'Exception:'.$ex->getMessage();
            return false;
        }
    }

}